home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacAddict 117
/
MacAddict 117.dmg
/
Software
/
Internet & Communication
/
Snak 5.1 (shareware).dmg
/
Snak.app
/
Contents
/
Resources
/
Scripts
/
NoTopics.txt
< prev
next >
Wrap
Text File
|
2005-03-14
|
2KB
|
44 lines
# This is an example of how to use event hooks to change the Snak behavior.
# If you want to prevent the channel topics from being displayed in the window
# you can load this script. If they're not work-safe for example..
# The raw_irc event hook is called for every message Snak receives from the server.
# The ^ character means that Snak should not continue processing the message if
# the event hook is activated.
# This variant is only going to be activated for topic changes in one particular channel #channelname
on ^raw_irc "% TOPIC #channelname*" {
}
# The % character is called a wildcard. It stands in for a single word.
# The * character at the end is also a wildcard. It matches any sequence of characters.
# The message from the server is in this format:
# :you!snak@67.71.61.233 TOPIC #channelname :new topic
# if you compare to the pattern you can see that this message will match.
# On another channel it would be
# :you!snak@67.71.61.233 TOPIC #otherchannel :other topic
# This would not match the pattern because the channel name is different
# This variant does not have a specific channel name in the pattern so it will match any channel.
on ^raw_irc "% TOPIC *" {
}
# Just to complicate things, when you join a channel the server will send you the channel
# topic in a so called numbered command. The command number is 332.
# So to intercept the topic both initially, and when someone change it after you've joined
# we need to intercept both the TOPIC message and the numbered 332 command.
on ^332 * {
}